/**
 * File Name:CustomException.java
 * Date:2016年4月13日
 * Copyright (c) 2016, lansent All Rights Reserved.
 */

package com.qrxl.common.exception;


import com.qrxl.enums.HjReturnCode;

/**
 * 自定义异常
 * Function: . <br/>
 * Reason:  <br/>
 * Date: 2016年4月13日 上午9:56:19 <br/>
 *
 * @author lijiaqian
 */
public class CustomException extends RuntimeException {

    private static final long serialVersionUID = 1107323084633784325L;
    /**
     * 支持自定义异常code
     */
    private HjReturnCode returnCode;

    public CustomException(String message) {
        super(message);
    }

    public CustomException(HjReturnCode returnCode, String message) {
        super(message);
        this.returnCode = returnCode;
    }

    public CustomException(Throwable cause) {
        super(cause);
    }

    public CustomException(String message, Throwable cause) {
        super(message, cause);
    }

    public CustomException(HjReturnCode returnCode) {
        this.returnCode = returnCode;
    }

    public HjReturnCode getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(HjReturnCode returnCode) {
        this.returnCode = returnCode;
    }
}
